package com.laich.springcloud.security.conf;
/*
 * package com.cjs.sso.config;
 * 
 * import org.springframework.beans.factory.annotation.Autowired; import
 * org.springframework.context.annotation.Bean; import
 * org.springframework.context.annotation.Configuration; import
 * org.springframework.security.config.annotation.web.builders.HttpSecurity;
 * import
 * org.springframework.security.oauth2.config.annotation.web.configuration.
 * EnableResourceServer; import
 * org.springframework.security.oauth2.config.annotation.web.configuration.
 * ResourceServerConfigurerAdapter; import
 * org.springframework.security.oauth2.provider.token.DefaultTokenServices;
 * import org.springframework.security.oauth2.provider.token.TokenStore; import
 * org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
 * import org.springframework.security.web.authentication.preauth.
 * AbstractPreAuthenticatedProcessingFilter;
 * 
 * import com.cjs.sso.config.handler.CustomLogoutSuccessHandler;
 * 
 * //@Configuration
 * 
 * @EnableResourceServer //注解来开启资源服务器 public class ResourceServerConfiguration
 * extends ResourceServerConfigurerAdapter {
 * 
 * @Override public void configure(HttpSecurity http) throws Exception {
 * 
 * // 配置那些资源需要保护的 http.logout() .logoutUrl("/logout")
 * .logoutSuccessHandler(customLogoutSuccessHandler()); //
 * .exceptionHandling().accessDeniedHandler(customAccessDeniedHandler())
 * //权限认证失败业务处理 //.authenticationEntryPoint(customAuthenticationEntryPoint());
 * //认证失败的业务处理 // http.addFilterBefore(permitAuthenticationFilter,
 * AbstractPreAuthenticatedProcessingFilter.class); //自定义token过滤
 * token校验失败后自定义返回数据格式 }
 * 
 * @Bean public LogoutSuccessHandler customLogoutSuccessHandler(){ return new
 * CustomLogoutSuccessHandler(); }
 * 
 * 
 * @Bean public AuthenticationFailureHandler customLoginFailHandler(){ return
 * new CustomLoginFailHandler(); }
 * 
 * 
 * 
 * 
 * 
 * }
 */